package com.mrd.gtimpframe.entity;

import java.io.Serializable;
import java.util.Date;

public class BizProtocolConfirmRef extends BizProtocolConfirmRefKey implements Serializable {
    private Date createTime;

    private static final long serialVersionUID = 1L;

    public BizProtocolConfirmRef(String protocolId, String confirmId, Date createTime) {
        super(protocolId, confirmId);
        this.createTime = createTime;
    }

    public BizProtocolConfirmRef() {
        super();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", createTime=").append(createTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BizProtocolConfirmRef other = (BizProtocolConfirmRef) that;
        return (this.getProtocolId() == null ? other.getProtocolId() == null : this.getProtocolId().equals(other.getProtocolId()))
            && (this.getConfirmId() == null ? other.getConfirmId() == null : this.getConfirmId().equals(other.getConfirmId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getProtocolId() == null) ? 0 : getProtocolId().hashCode());
        result = prime * result + ((getConfirmId() == null) ? 0 : getConfirmId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }
}